/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package banksystem;
import java.util.Date;
/**
 *
 * @author ROBM
 */
public class Transaction {
	TransactionType mType;
	Date mDate;
	double mAmount;
	
	public Transaction(TransactionType type, double amount)
	{
		mType = type;
		mDate = new Date();//default constructor for current time in ms 
		mAmount = amount;
		
	}
	
	public TransactionType getType()
	{
		return mType;
	}
	
	public Date getDate()
	{
		return (Date)mDate.clone();
	}
	
	public double getAmount()
	{	
		return mAmount;
	}
	
	public Object[] toTableEntry()
	{
		return new Object[]{mDate.clone(), mType, new Double(mAmount)};
	}
}
